﻿using machine_registration.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace machine_registration.Infrastructure
{
    public interface IData_SourceService
    {
        /// <summary>
        /// 初始化数据
        /// </summary>
        public void Initialize();
        /// <summary>
        /// 设置数据源
        /// </summary>
        /// <param name="alertItems"></param>
        public void SetAlertItems(ObservableCollection<Information_Push> alertItems);
        // <summary>
        /// 移除一个或多个 Information_Push 对象
        /// </summary>
        /// <param name="items">要移除的 Information_Push 对象</param>
        public void RemoveAlertItems(params Information_Push[] items);
        /// <summary>
        /// 获取所有 Information_Push 对象
        /// </summary>
        /// <returns></returns>
        public ObservableCollection<Information_Push> GetInformation();
        /// <summary>
        /// 添加一个或多个 Information_Push 对象
        /// </summary>
        /// <param name="items">要添加的 Information_Push 对象</param>
        public void AddAlertItems(params Information_Push[] items);
        /// <summary>
        /// 启动定时任务，检查是否到达指定时间
        /// </summary>
        public void Start();
        /// <summary>
        /// 停止定时任务
        /// </summary>
        public void Stop();
        /// <summary>
        /// 消息推送
        /// </summary>
        public event Action<Information_Push> OnAlertTimeReached;

    }
}
